﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace SH_VBoxServiceTrayApp
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {

            //Closes the application if there is already an instance of it running.
            //And re-sets focus on the current one.
            if (ApplicationRunningHelper.AlreadyRunning())
            {
                return;
            }


            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
        

            //change to application context so that the Notify icon is the one that keeps the app alive.
            //Need to worry about other stuff to about how many of this instance can be opened. etc.
            Application.Run(new TrayClass());
        }
    }
}
